﻿using System.Xml.Serialization;

namespace RapidSalesAdminPortalAPI.Models
{
    [XmlRoot(Namespace = "http://tempuri.org/")]
    public class FindB2BAccountProductResponse
    {
        [XmlElement(Namespace = "FindB2BAccountProduct")]
        public Return Return { get; set; }
    }

    [XmlRoot(Namespace = "FindB2BAccountProduct")]
    public class Return
    {
        public Error Error { get; set; }
        [XmlElement("PRODUCT")]
        public List<Product> ProductList { get; set; }
    }

    [XmlRoot(Namespace = "http://omniticket.network/ovw7")]
    public class Error
    {
        [XmlElement(Namespace = "http://omniticket.network/ovw7")]
        public string Code { get; set; }
        [XmlElement(Namespace = "http://omniticket.network/ovw7")]
        public string Type { get; set; }
        [XmlElement(Namespace = "http://omniticket.network/ovw7")]
        public string Text { get; set; }
    }

    [XmlRoot(Namespace = "http://omniticket.network/ovw7")]
    public class Product
    {
        [XmlElement(Namespace = "http://omniticket.network/ovw7")]
        public string? AK { get; set; }
        [XmlElement(Namespace = "http://omniticket.network/ovw7")]
        public string? SHEETNAME { get; set; }
        [XmlElement(Namespace = "http://omniticket.network/ovw7")]
        public Pricelist Pricelist { get; set; }
        [XmlElement(Namespace = "http://omniticket.network/ovw7")]
        public Pricetable Pricetable { get; set; }
        [XmlElement(Namespace = "http://omniticket.network/ovw7")]
        public Price Price { get; set; }

    }

    // 类似地，我们可以为 Pricelist, Pricetable, Price, 等其他嵌套结构定义类  
    public class Pricelist
    {
        [XmlElement(Namespace = "http://omniticket.network/ovw7")]
        public string Code { get; set; }
        [XmlElement(Namespace = "http://omniticket.network/ovw7")]
        public int ID { get; set; }
    }

    public class Pricetable
    {
        [XmlElement(Namespace = "http://omniticket.network/ovw7")]
        public string AK { get; set; }
        [XmlElement(Namespace = "http://omniticket.network/ovw7")]
        public int ID { get; set; }
    }

    public class Price
    {
        [XmlElement(Namespace = "http://omniticket.network/ovw7")]
        public string Currency { get; set; }
        [XmlElement(Namespace = "http://omniticket.network/ovw7")]
        public decimal Net { get; set; }
        // 其他价格相关的属性...  
    }
}
